package com.ruoyi.api.kehu;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IJiajiaCancelConfigService;
import com.ruoyi.system.service.IJiajiaShouhouConfigService;
import com.ruoyi.system.service.IJiajiaTousuConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api/config")
@Api(tags = "用户端配置相关接口")
public class ApiKndConfigController {

    @Autowired
    private IJiajiaCancelConfigService cancelConfigService;

    @Autowired
    private IJiajiaTousuConfigService tousuConfigService;

    @Autowired
    private IJiajiaShouhouConfigService shouhouConfigService;


    @ApiOperation("取消订单原因")
    @PostMapping("/cancelConfigList")
    public AjaxResult cancelConfigList()
    {
        return AjaxResult.success(cancelConfigService.selectJiajiaCancelConfigList(null));
    }


    @ApiOperation("投诉举报原因")
    @PostMapping("/touSuConfigList")
    public AjaxResult touSuConfigList()
    {
        return AjaxResult.success(tousuConfigService.selectJiajiaTousuConfigList(null));
    }

    @ApiOperation("申请售后原因")
    @PostMapping("/shouHouConfigList")
    public AjaxResult shouHouConfigList()
    {
        return AjaxResult.success(shouhouConfigService.selectJiajiaShouhouConfigList(null));
    }
}
